
{/* <ToggleButton value="100" style={{background: '#607d8b'}}></ToggleButton>
<ToggleButton value="200" style={{background: '#795548'}}>2-较差（C级）</ToggleButton>
<ToggleButton value="300" style={{background: '#4caf50'}}>3-可以（C级）</ToggleButton>
<ToggleButton value="400" style={{background: '#ffc107'}}>4-满意（B级）</ToggleButton>
<ToggleButton value="500" style={{background: '#ff5722'}}>5-理想（A-S级）</ToggleButton> */}

const background = ['#607d8b', '#795548', '#4caf50', '#ffc107', '#ff5722']
const textColor = ['#333', '#333', '#fff', '#fff', '#fff']

export const getLevelStyle = (level) => {
  const index = level / 100 - 1
  console.log('index:', index)
  return {
    background: background[index],
    color: textColor[index]
  }
}

export const getLevelText = (level) => {
  const index = level / 100
  switch(index){
    case 1:
      return '1-垃圾（C级）'
    case 2:
      return '2-较差（C级）'
    case 3:
      return '3-可以（C级）'
    case 4:
      return '4-满意（B级）'
    case 5:
      return '5-理想（A-S级）'
  }
}